﻿using System;
using System.Globalization;
using System.Text;
using System.Text.RegularExpressions;

class DateInCanada
{
    static void Main()
    {
        string text = "Static void Main() 19.12.2005 19.12.2008 nakov@telerik.com. using System,nakov@gmail.com return";
        ExtractDate(text);
    }

    public static void ExtractDate(string text)
    {
        Regex dateRegex = new Regex(@"[0-9]{2}.[0-9]{2}.[0-9]{4}");
        MatchCollection dateMatches = dateRegex.Matches(text);

        StringBuilder dates = new StringBuilder();

        foreach (Match dateMatch in dateMatches)
        {
            dates.Append(dateMatch.Value);
            DateTime date = DateTime.ParseExact(dateMatch.Value, "dd.MM.yyyy", CultureInfo.InvariantCulture);
            Console.WriteLine(date.ToString(CultureInfo.GetCultureInfo("en-CA").DateTimeFormat.ShortDatePattern));
        }
    }
}